package tech.wetech.admin3.sys.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import tech.wetech.admin3.sys.model.DID;

public interface DIDRepository extends JpaRepository<DID, Integer> {
  DID findByDidNo(String didNo);

  DID findBySerial(String serial);

  DID findByModelFileHashes(String modelFileHash);

  DID findByImageHashes(String imageHash);

  Integer countBy();

  DID findByName(String Name);

  @Query("SELECT MAX(id) FROM DID")
  Integer findMaxId();

  void deleteBySerial(String serial);
}
